import React, { ReactNode } from 'react';

interface IVNumberProps {
  text: ReactNode;
  precision: number;
  componentProps?: any;
}

const VNumber: React.FC<IVNumberProps> = props => {
  const { text, precision } = props;
  return (
    <span>
      {Number.isNaN(Number(text)) ? Number(text).toFixed(precision) : '-'}
    </span>
  );
};

export default VNumber;
